<?php
echo $header;
echo $column_left;
echo $column_right;
$width_content = '98%';
if (($column_left) && ($column_right)) {
    $width_content = '48%';
} elseif (($column_left) || ($column_right)) {
    $width_content = '73%';
}
?>
<div class="content" style="width:<?php echo $width_content; ?>"><?php echo $content_top; ?>
    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
            <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>
    <ul data-role="listview" data-divider-theme="a" data-inset="true">
        <li data-role="list-divider"><h1><?php echo $heading_title; ?></h1></li>
    </ul><br />
    <div data-role="collapsible" data-content-theme="a" data-collapsed="false">
        <h3><?php echo $text_order_detail; ?></h3>
        <ul data-role="listview" data-divider-theme="a" data-inset="true">
            <?php if ($invoice_no) { ?>
                <li><b><?php echo $text_invoice_no; ?></b> <?php echo $invoice_no; ?></li>
            <?php } ?>
            <li><b><?php echo $text_order_id; ?></b> #<?php echo $order_id; ?></li>
            <li><b><?php echo $text_date_added; ?></b> <?php echo $date_added; ?></li>
            <li><?php if ($payment_method) { ?>
                    <b><?php echo $text_payment_method; ?></b> <?php echo $payment_method; ?>
                <?php } ?></li>
            <?php if ($shipping_method) { ?>
                <li><b><?php echo $text_shipping_method; ?></b> <?php echo $shipping_method; ?></li>
            <?php } ?>
        </ul>
    </div>
    <div data-role="collapsible" data-content-theme="a" data-collapsed="false">
        <h3><?php echo $text_payment_address; ?></h3>
        <ul data-role="listview" data-divider-theme="a" data-inset="true">
            <li><?php echo $payment_address; ?></li>
        </ul>
    </div>
    <?php if ($shipping_address) { ?>
        <div data-role="collapsible" data-content-theme="a" data-collapsed="false">
            <h3><?php echo $text_shipping_address; ?></h3>
            <ul data-role="listview" data-divider-theme="a" data-inset="true">
                <li><?php echo $shipping_address; ?></li>
            </ul>
        </div>
    <?php } ?>
        <div class="list">
        <ul data-role="listview" data-divider-theme="a" data-theme="a" data-inset="true">
                <?php foreach ($products as $product) { ?>
                <li data-role="list-divider"><?php echo $product['name']; ?></li>
                    <li>
                    <a onclick="return false">
                        <strong><?php echo $product['model']; ?></strong>
                        <?php foreach ($product['option'] as $option) { ?>
                            - <small><?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>&nbsp;
                        <?php } ?>
                        <p class="ui-li-aside">
                            <span><?php echo $column_price . ': ' . $product['price']; ?></span><br />
                            <span><?php echo $column_total . ': ' . $product['total']; ?></span>
                        </p>
                    </a>
                    <a href="<?php echo $product['return']; ?>" data-icon="back" data-rel="dialog" data-transition="slideup"><?php echo $button_return; ?></a>
                    </li>
                <?php } ?>
            </ul>
        </div>
        <br />
        <div class="list">
        <ul data-role="listview" data-divider-theme="a" data-theme="a" data-inset="true">
            <?php foreach ($vouchers as $voucher) { ?>
                <li>
                    <strong><?php echo $voucher['description']; ?></strong>
                    <p class="ui-li-aside">
                        <span><?php echo $column_total . ': ' . $voucher['amount']; ?></span>
                    </p>
                </li>
            <?php } ?>
        </ul>
    </div>
    <br />
    <div class="list">
        <ul data-role="listview" data-divider-theme="a" data-inset="true">
                <?php foreach ($totals as $total) { ?>
                    <li style="text-align:right"><strong><?php echo $total['title']; ?>:</strong> <?php echo $total['text']; ?></li>
                <?php } ?>
            </ul>
        </div>
    <?php if ($comment) { ?>
        <div class="list">
            <ul data-role="listview" data-divider-theme="a" data-inset="true">
                <li data-role="list-divider"><?php echo $text_comment; ?></li>
                <li><?php echo $comment; ?></li>
            </ul>
        </div>
    <?php } ?>
    <?php if ($histories) { ?>
        <br />
        <div class="list">
            <ul data-role="listview" data-divider-theme="a" data-inset="true">
                <li data-role="list-divider"><?php echo $text_history; ?></li>
                <?php foreach ($histories as $history) { ?>
                    <li><?php echo $column_date_added; ?>: <?php echo $history['date_added']; ?><br />
                    <?php echo $column_status; ?>: <?php echo $history['status']; ?><br />
                    <?php echo $column_comment; ?>: <?php echo $history['comment']; ?></li>
                <?php } ?>
            </ul>
        </div>
    <?php } ?>
    <div class="buttons">
        <div class="right"><a data-role="button" href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>
    </div>
    <?php echo $content_bottom; ?>
</div>
<?php echo $footer; ?> 